package com.igs.muziapp;

import java.util.ArrayList;
import java.util.HashMap;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.SimpleAdapter;

public class TextInput extends Activity {

	private ArrayList<HashMap<String, Object>> list = new ArrayList<HashMap<String, Object>>();
	private SimpleAdapter adapter;
	private ListView LView;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_text_input);

		String StrItem[] = { "ItemName","ImageView" };
		int IntView[] = { R.id.textView1, R.id.imageView1 };

		String ItemName[] = { "帳號:", "密碼:" };

		for (int i = 0; i < ItemName.length; i++) {
			HashMap<String, Object> item = new HashMap<String, Object>();
			item.put(StrItem[0], ItemName[i]);
			item.put(StrItem[1], R.drawable.mb_app_p003_fcicon_001);
			list.add(item);
		}
		adapter = new SimpleAdapter(this, list, R.layout.inputitem00, StrItem,
				IntView);
		LView = (ListView) findViewById(R.id.listView1);
		LView.setAdapter(adapter);
		LView.setOnItemClickListener(listViewOnItemClickListener);

	}

	private ListView.OnItemClickListener listViewOnItemClickListener = new ListView.OnItemClickListener() {

		@Override
		public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
				long arg3) {
			// TODO Auto-generated method stub
			Log.d("Test", "sdsadfa");

		}

	};

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_text_input, menu);
		return true;
	}
}
